package com.wl.api.dto.system;

import java.io.Serializable;
import java.util.Date;

import com.wl.api.dto.base.PaginationConst;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 *
 * 首页资讯信息
 *
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class OmsIndexInformationDTO extends PaginationConst implements Serializable {

	private static final long serialVersionUID = 1L;

	private Integer id;

	private String title;

	private String imgUrl;

	private String description;

	private Integer status;//0:未发布， 1：已发布，2：暂停

	private Date createTime;

	private Long createUserId;

	private String createUserName;

	private Date updateTime;

	private String updateUser;
	
	public OmsIndexInformationDTO buildCreateMsg(Long createUserId, String username) {
		this.createUserId = createUserId;
		this.createTime = new Date();
		this.createUserName = username;
		this.status = 0;
		return this;
	}
	public OmsIndexInformationDTO buildUpdateMsg(String updateUser) {
		this.updateTime = new Date();
		this.updateUser = updateUser;
		return this;
	}
	
	public OmsIndexInformationDTO buildStatus(Integer status) {
		this.updateTime = new Date();
		this.status = status;
		return this;
	}
}
